Custom bioses for QEMU & UEFI
Home About Projects Blog Games Contact Support!! NOTE !!: This assumes you are using an Ubuntu Linux host to build; I could not get this to work on Alpine, nor other distributions.
$ sudo apt-get install build-essential git uuid-dev iasl nasm
$ git clone https://github.com/tianocore/edk2
$ cd edk2
$ git submodule update --init
$ source edksetup.sh
$ make -C BaseTools/
For X86_64:
$ build -a X64 -t GCC5 -b RELEASE -p Ovmf/OvmfPkgX64.dsc
Final output files should be under Build/OvmfX64/RELEASE_GCC5/FV/, or can use e.g. find Build -name OVMF.fd
:
Edit files OvmfPkg/OvmfPkgX64.dsc
and OvmfPkg/OvmfPkgX64.fdf
For example, to add USB Mouse drivers for "Simple Pointer Protocol" and/or "Absolute Pointer Protocol".
! NOTE !: While you can add both simple and absolute pointer protocols, building with both usually has the
Simple Pointer protocol "overwrite" the absolute pointer protocol for USB mouse devices.
I recommend using one or the other, or building 2 separate OVMF.fd
files, 1 for Simple Pointer, and 1 for
Absolute Pointer.
Simple Pointer Protocol:
MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
to OvmfPkg/OvmfPkgX64.dsc
under the "Usb Support" section.INF MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
to OvmfPkg/OvmfPkgX64.fdf
under the "Usb Support" section.Absolute Pointer Protocol:
MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf
to OvmfPkg/OvmfPkgX64.dsc
under the "Usb Support" section.INF MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf
to OvmfPkg/OvmfPkgX64.fdf
under the "Usb Support" section.